//
//  WheelController.m
//  CoreAnimationDemo
//
//  Created by AY on 17/5/31.
//  Copyright © 2017年 Alex. All rights reserved.
//

#import "WheelController.h"
#import "AYWheel.h"

@interface WheelController ()
@property (nonatomic, strong) AYWheel *wheel;
@end

@implementation WheelController

- (instancetype)init
{
    self = [super init];
    if (self) {
        self = [self initWithNibName:NSStringFromClass([WheelController class]) bundle:nil];
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    AYWheel *wheel = [AYWheel wheel];
    wheel.center = self.view.center;
    [self.view addSubview:wheel];
    self.wheel = wheel;
}

- (IBAction)start {
    [self.wheel startRotating];
}

- (IBAction)stop {
    [self.wheel stopRotating];
}
@end
